Skip to content

[test][radio] Add axe tests and WCAG conformance reports - #48920

Merged
michelengelen merged 11 commits into
mui:masterfrom
michelengelen:a11y/stack/radio
Sep 7, 2026
Merged

michelengelen merged 11 commits into
mui:masterfrom
michelengelen:a11y/stack/radio

Conversation

@michelengelen

@michelengelen michelengelen commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Adds axe coverage and WCAG 2.2 Level A/AA conformance reports for Radio and RadioGroup.

Radio

Result Count
✅ Supports 23
⚠️ Partially Supports 2
❌ Does Not Support 0
➖ Not Applicable 30

RadioGroup

Result Count
✅ Supports 7
⚠️ Partially Supports 0
❌ Does Not Support 0
➖ Not Applicable 30
↗ Inherited from Radio 18

Known gaps: focus-indicator contrast and custom icons below 3:1 (1.4.11), and disableRipple removing the focus indicator (2.4.7). No group-level gaps.

Reports: Radio/accessibility.md · RadioGroup/accessibility.md

Important

How to review this PR

Layer 7 of 14 in a stacked series (#48915 → #48926). Its branch is built on a11y/stack/switch (#48919). GitHub cannot chain PR bases across a fork, so every PR in the series targets master instead.

Review only the last commit — d2b70c8. Everything above it belongs to the layers below, and disappears as those merge.

Original work by @mj12albert. Supersedes #48751, rebased onto current master.

Part of the WCAG conformance effort (#14187).

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@michelengelen michelengelen added test accessibility a11y scope: radio Changes related to the radio. scope: radio group Changes related to the radio group. labels Aug 5, 2026
@michelengelen
michelengelen force-pushed the a11y/stack/radio branch 5 times, most recently from 53cd134 to 8dde96f Compare August 6, 2026 10:43
@michelengelen
michelengelen marked this pull request as ready for review August 7, 2026 10:15
@michelengelen
michelengelen force-pushed the a11y/stack/radio branch 3 times, most recently from ed67a1e to d2b70c8 Compare August 11, 2026 12:25
@michelengelen

Copy link
Copy Markdown
Member Author

PR review

Nothing merge-blocking. The inputProps → slotProps.input demo modernization is a welcome side fix, and the browser-gated roving-focus test for RadioGroup is correctly skipIf(isJsdom()). The two RadioGroup tests that were deleted (radiogroup role, shared generated name) reappear unchanged under 1.3.1. One parity gap.

Tests (1)

1. 🟡 Radio 2.5.2 skips the cancellation branch the sibling suites assert

Location: packages/mui-material/src/Radio/Radio.test.js:257

it('2.5.2 Pointer Cancellation: activates on the pointer up-event, not the down-event', ...

Button, Checkbox, Switch, and ToggleButton all press on the control, move off the target, release, and assert that nothing activates. The Radio test only asserts that the down-event alone does not select. The abort path — the substance of 2.5.2 — is untested for Radio.

Failure scenario: a regression that commits the selection on pointerdown-plus-pointerup-anywhere passes this test.

Fix: add the press → move to an outside target → release sequence and assert checked stays false, as in the Checkbox suite.

Verdict

Approve after nits - one missing cancellation branch keeps Radio below the parity of its sibling suites.


🤖 Review generated with Claude Code

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 19, 2026
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 26, 2026
Applies mui#48916 (comment):
the shared reports table starts empty, and each component PR appends
its own row.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HgD6GEW3UxNRvC2abbTy9
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 27, 2026
# Conflicts:
#	packages/mui-material/src/Radio/Radio.test.js
#	packages/mui-material/src/accessibility.md
#	test/regressions/demoMeta.ts
@github-actions github-actions Bot removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Sep 1, 2026
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 2, 2026
Comment on lines +66 to +70
| Component | ✅ Supports | ⚠️ Partially Supports | ❌ Does Not Support | ➖ Not Applicable |
| :------------------------------------------ | :---------- | :-------------------- | :------------------ | :---------------- |
| [Button](./Button/accessibility.md) | 23 | 4 | 0 | 28 |
| [Radio](./Radio/accessibility.md) | 23 | 2 | 0 | 30 |
| [RadioGroup](./RadioGroup/accessibility.md) | 7 | 0 | 0 | 30 |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this table have an "inherited" column?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where would it inherit from?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RadioGroup has an inherited part, that it inherits from Radio

I feel like it should be displayed here,

inherited
7 (from Radio)

Comment thread packages/mui-material/src/Radio/Radio.test.js Outdated
Comment thread packages/mui-material/src/Radio/Radio.test.js Outdated
Comment thread packages/mui-material/src/Radio/Radio.test.js
Comment thread packages/mui-material/src/Radio/Radio.test.js
Comment thread packages/mui-material/src/Radio/Radio.test.js
michelengelen and others added 2 commits September 4, 2026 09:39
# Conflicts:
#	packages/mui-material/src/accessibility.md
#	test/regressions/demoMeta.test.ts
#	test/regressions/demoMeta.ts
Reach controls with user.tab instead of programmatic focus in the
2.1.1, 2.1.2, and 2.4.3 tests. Add a 2.4.3 test: a disabled radio is
not in the tab order. Add a RadioGroup test: arrow navigation skips a
disabled radio. The roving arrow-key test in RadioGroup.test.js
already covers focus and value movement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HgD6GEW3UxNRvC2abbTy9
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 4, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HgD6GEW3UxNRvC2abbTy9
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 4, 2026
# Conflicts:
#	packages/mui-material/src/accessibility.md
@github-actions github-actions Bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Sep 4, 2026
# Conflicts:
#	packages/mui-material/src/accessibility.md
#	test/regressions/demoMeta.test.ts
#	test/regressions/demoMeta.ts
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 4, 2026
The merge commit kept conflict markers in demoMeta.ts and its test
file. Restore both sides: the progress entries from master and the
radio entries from the branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013HgD6GEW3UxNRvC2abbTy9
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 4, 2026
# Conflicts:
#	packages/mui-material/src/accessibility.md
#	test/regressions/demoMeta.test.ts
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 7, 2026
@michelengelen
michelengelen merged commit e0c9fbc into mui:master Sep 7, 2026
22 checks passed
@michelengelen
michelengelen deleted the a11y/stack/radio branch September 7, 2026 13:46
brijeshb42 pushed a commit to brijeshb42/material-ui that referenced this pull request Sep 9, 2026
Co-authored-by: Albert Yu <albert@albertyu.co>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility a11y scope: radio group Changes related to the radio group. scope: radio Changes related to the radio. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants